home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12222 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ts1-025.jaxnet.com!user
  2. From: garyg@jax.jaxnet.com (Gary M. Greenberg)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: string search?
  5. Date: 29 Mar 1996 22:27:39 GMT
  6. Organization: Southeast Network Services, Inc.
  7. Message-ID: <garyg-2903961718020001@ts1-025.jaxnet.com>
  8. References: <4jbmtk$78k@dfw-ixnews3.ix.netcom.com> <315AA9F1.9D9@isd.net>
  9. NNTP-Posting-Host: ts1-025.jaxnet.com
  10.  
  11. In article <315AA9F1.9D9@isd.net>, David Peterson <dpeterso@isd.net> wrote:
  12.  
  13. >  Ricardo Mor wrote:
  14. >  > 
  15. >  >     How can I search for a string of characters within another string?
  16. >  > for example..
  17. >  > 
  18. >  >     string = "NEXT_TIME";
  19. >  > 
  20. >  >     string2 = "NEXT";
  21. >  > 
  22. >  >     how can I find  string2 in string?
  23. >  > 
  24. >  > Eddy...
  25. >  
  26. >          strstr(string, string2);
  27. >  
  28. >  Now tell me, was this a joke, or what?
  29. >  
  30. >  Dave
  31.  
  32. Maybe not. Perhaps what the individual wants is some examples of how to
  33. most efficiently use algos to solve finding a string within another
  34. string within some large docs? If that's the case, Ricardo would do well
  35. to look at the July 1995 issue of C/C++ User's Journal && the article by
  36. John Ross therein.
  37.  
  38. Hope I'm not stretching things for R.M. here; if so, 'rm -r ~rmor' ;-)
  39.  
  40. C'ya,
  41.  
  42. gary    /* the Sorcerer's Apprentice */
  43.     http:/jax.jaxnet.com/~garyg/main_page.html
  44.  
  45. Free Speech in America murdered by the Communications Decency Act.
  46.       (((U.S. Congress && Executive) == (Collective Moron)) == 1)
  47.